package com.yunding.OA.service.Impl;


import com.yunding.OA.mapper.YdjfMapper;
import com.yunding.OA.pojo.Ydjf;
import com.yunding.OA.service.YdjfOaservice;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class YdjfOaserviceImpl implements YdjfOaservice {

    @Resource
    private YdjfMapper ydjfMapper;


    @Override
    public Ydjf selectById(long id) {
        return ydjfMapper.selectByPrimaryKey(id);
    }

    /**
     * @return 查找所有oa用户
     */
    @Override
    public List<Ydjf> findAllYdjf() {
        return ydjfMapper.findAllYdjf();
    }

    /**
     * @param name
     * @return 根据名字查找oa用户
     */
    @Override
    public Ydjf selectByPrimaryName(String name) {
        return ydjfMapper.selectByPrimaryName(name);
    }

    /**
     * @param loginname
     * @return 根据loginname查找oa用户
     */
    @Override
    public Ydjf selectByloginName(String loginname) {
        return ydjfMapper.selectByloginName(loginname);
    }
}
